from urllib.request import localhost

import pymysql
from DBUtils import *



# host = "localhost"
# user = "root"
# password = "root"
# database = "baofuzhai"
#
# db = pymysql.connect(host=host, user=user, password=password, database=database)
#
# cursor = db.cursor()
#
# sql = "select * from CT"
# sql1 = "select * from CT where 价格 > %s"
#
# m = 1000
#
# # cursor.execute(sql)
# cursor.execute(sql1,m)
# data = cursor.fetchall()
#
# for row in data:
#     print(row)
#
#
# cursor.close()
# db.close()


sql = "select * from CT"

data = selectall(sql)
for row in data:
    print(row)
#
# sqlinsert = "insert into CT(装备,价格) values(%s,%s)"
# pr = ["P250",300.00]
#
# update(sqlinsert, pr)





